import sys

from PySide6.QtGui import QPainter, QPen, QColor, Qt, QPixmap
from PySide6.QtCore import Qt, QPoint, QSize
from PySide6.QtWidgets import QApplication, QLabel, QMainWindow

class MainWindow(QMainWindow):
    def __init__(self):
        super().__init__()

        self.label = QLabel()
        self.canvas = QPixmap(QSize(400, 300))
        self.canvas.fill(Qt.white)

        self.setCentralWidget(self.label)
        
        self.draw_something()

    def draw_something(self):
        painter = QPainter(self.canvas)
        pen = QPen()
        pen.setWidth(40)
        pen.setCapStyle(Qt.RoundCap)
        pen.setJoinStyle(Qt.RoundJoin)
        pen.setColor(Qt.red)
        painter.setPen(pen)

        painter.drawPoint(200, 150)
        painter.end()

        self.label.setPixmap(self.canvas)

app = QApplication(sys.argv)
window = MainWindow()
window.show()
app.exec()
